<{include file="common/header.tpl"}>
<section id="spread_one" class="column">
        <h4 class="alert_info">欢迎使用 哇吖管理系统！</h4>
        <article class="module width_3_quarter">
        <header>
            <{include file="effect/filter.tpl"}>
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
			<table class="tablesorter" cellspacing="0"> 
			<thead> 
				<tr> 
   					
    				<th>日期</th> 
					<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
						<th>项目主管</th>
                    <{/if}>
					<th>推广活动</th>
					<th>渠道名称</th>
    				<th>渠道收入</th> 
                    <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
    				    <th>平台收入</th> 
                        <th>流水总额</th>
                    <{/if}>
    				<th>分成比例</th> 
    				<th>计费标准</th> 
				</tr> 
			</thead> 
			<tbody>
				<{foreach from =$list item ='v' name="rs_list"}> 
                    <{if $v.activity_info.pay_type == 'CPS'}>
					<tr>
						<td><{$v.day}></td>
						<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
							<td><{$manager_name}></td>
						<{/if}>
						<td><{if $isActivity}><{$v.activity_info.name}><{else}>全部活动</td><{/if}>
						<{if $isChannel}><td><{$v.channel_info.name}></td><{else}><td>全部渠道</td><{/if}>
						<td>￥<{$v.counts/100|number_format:2}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td>￥<{$v.platform_earnings/100|number_format:2}></td>
                            <td>￥<{$v.real_counts/100|number_format:2}></td>
                        <{/if}>
						<{if $isActivity}><td><{$v.activity_info.price}>%</td><{else}><td>全部</td><{/if}>
						<td>收益分成</td>
					</tr> 
    
                    <{else}>
					<tr>
						<td><{$v.day}></td>
						<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
							<td><{$manager_name}></td>
						<{/if}>
						<td><{if $isActivity}><{$v.activity_info.name}><{else}>全部活动</td><{/if}>
						<{if $isChannel}><td><{$v.channel_info.name}></td><{else}><td>全部渠道</td><{/if}>
						<td><{$v.counts}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td><{$v.real_counts}></td>
                        <{/if}>
						<{if $isActivity}><td>￥<{$v.activity_info.price/100|number_format:2}></td><{else}><td>全部</td><{/if}>
						<{if $isActivity}><td><{if $v.activity_info.pay_param == 'newbie'}>激活<{else}>下载<{/if}></td><{else}><td>全部</td><{/if}>
					</tr> 
                    <{/if}>

                    <{if $smarty.foreach.rs_list.last}>
					<tr>
						<td>汇总</td>
						<{if $isActivity}><td>&nbsp;</td><{/if}>
						<{if $isActivity && $user_info.role_id == 'supermanager'}><td>&nbsp;</td><{/if}>
						<{if !$isActivity && !$isChannel && $user_info.role_id == 'supermanager' || $user_info.role_id == 'commonmanager'}><td>&nbsp;</td><td>&nbsp;</td><{/if}>
						<{if  $user_info.role_id != 'commonmanager'}>
						<td>&nbsp;</td>
						<{/if}>
						<{if  $user_info.role_id == 'commonmanager' && !$isActivity && !$isChannel}>
						<td>&nbsp;</td>
						<{/if}>
						<td>￥<{$summary.counts/100|number_format:2}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td>￥<{$summary.platform_earnings/100|number_format:2}></td>
                        <{/if}>
						<{if $isActivity}><td>￥<{$summary.real_counts/100|number_format:2}></td><{/if}>
						<{if $isActivity}><td>&nbsp;</td><{/if}>
					</tr> 
                    <{/if}>


				<{/foreach}>
			</tbody> 
			</table>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>			
<{include file="common/footer.tpl"}>
